package com.kcyu.sfherp.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;

@Data
@TableName("orchmx")
public class OrderMx {

    @TableId
    @ExcelIgnore
    private String spbh;

    @ExcelProperty("单号")
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
    @ColumnWidth(12)
    private String dh;

    private String khbh;
    @ExcelIgnore
    private String khname;
    @ExcelProperty("品名")
    @ColumnWidth(24)
    private String spname;

    @ExcelProperty("单位")
    @ColumnWidth(7)
    private String dw;

    @ExcelProperty("小单位")
    @ColumnWidth(7)
    private String dw2;

    @ExcelProperty("数量")
    @ColumnWidth(7)
    private Float sl;

    @ExcelIgnore
    private String prnjs;

    @ExcelIgnore
    private String prnxs;

    @ExcelProperty("单价")
    @ColumnWidth(-1)
    private Float jg;

    @ExcelProperty("金额")
    @ColumnWidth(-1)
    private Float je;

    @ExcelIgnore
    private Float jj;

//    @ExcelIgnore
//    private String line;

    @ExcelProperty("件数")
    private Float js; // 件数
    @ExcelProperty("散数")
    private Float xs; // 散数

    @ExcelIgnore
    private Float netweight;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("日期")
    @ColumnWidth(17)
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.RIGHT)
    private Timestamp rq;
}
